﻿using Microsoft.Reporting.WinForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BLevy.UI
{
    public partial class frmSociosReporteCumpleaños : Form
    {
        private DataTable dt;
        public frmSociosReporteCumpleaños(DataTable _dt)
        {
            dt = _dt;
            InitializeComponent();
        }

        private void frmSociosReporteCumpleaños_Load(object sender, EventArgs e)
        {
            try
            {

                ReportDataSource rds = new ReportDataSource();
                rds = new ReportDataSource("DataSet1", dt);

                this.reportViewer1.LocalReport.ReportEmbeddedResource = "BLevy.UI.Reportes.ReporteCumpleanos.rdlc";
                this.reportViewer1.LocalReport.DataSources.Clear();
                this.reportViewer1.LocalReport.DataSources.Add(rds);

                this.reportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}
